<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>事件冒泡</title>
		<script src="vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="box"> 
			<div @click="show2()">
				<input type="button" value="按钮" @click="show($event)"/>
				<input type="button" value="按钮" @click.stop="show2()"/>
			</div>
		</div>
		<script type="text/javascript">
			new Vue({
				el: '#box',
				data: {
				   
				},
				methods:{
					show:function(ev){
						alert(1);
						ev.cancelBubble=true;//阻止事件冒泡
					},
					show2:function(){
						alert(2)
					}
				}
			})
		</script>
	</body>
</html>
